Dual-VDD and Leakage Reduction in Pass Transistor Logic circuits
    by Jeff Brantley and Sam Ridenour
    
    
Included in this directory:

    - SchematicPics Folder - contains pictures of the schematics used in simulations. Pictures also help explain netlist used in ocean simulations.
        - 2to1mux.png - This is picture of a 2:1 pass transistor mux. Building block for the 16 to 1 mux
        - 16to1mux.png - Comprised of 15 2:1 muxes. This is the mux that is netlisted and used in the test bench.
        - 16to1mux2.png - Picture of a 16:1 mux made from transistors, not 2:1 muxes. Just as a reference, not used in simulations.
        - TestBench.png - This is the test bench used in most of the simulations listed below.
        - DC_SimsNoTB.png - This is the test bench used for measuring the leakage of the mux only. Does not include leakage of driving inverters.
        
    - LeakageFullTB Folder - contains all files need to run the DC leakage simulation on the full testbench (see testbench.png)
        - Data generated from simulation is a series of csv files that contain the leakage current for a a given SRAM value
        - Each data file contains at most 1024 SRAM values. So 64 files will be generated if all 65536 SRAM values are run.
        - This folder includes netlist, stimuli, and the ocean script used to generate the data
        
    - LeakageSneakOnly Folder - contains all files needed to run the DC leakage simulation on the mux only (not full testbench, see DC_SimsNoTB.png)
        - Data generated from simulation is a series of csv files that contain the leakage current for a a given SRAM value
        - This simulation looks at only the leakage caused by the mux and does not include the inverters driving the circuit and their leakage
        - Each data file contains at most 1024 SRAM values. So 64 files will be generated if all 65536 SRAM values are run.
        - This folder includes netlist, stimuli, and the ocean script used to generate the data
        
    - PTLMuxInputsSwitching Folder - contains all files need to run the transient analysis on the mux testbench for when the inputs to the mux are
        switching, but not the select lines (mux as a router)
        - The script generates csv files that contain energy consumption of the low and high rails as well as the delay info of the circuit
        - The csv files are named Output with the low VDD number and the difference between the low and high. For example output_900_200.txt
           is the result when VDDL=0.9V and VDDH=1.1V
        - Note that the ocean script was run with VDDHdeltaList = list(0.0) with large list in the VDDLList to generate the single VDD base case
            - in Figure 4 and 5, our base case was generated using VDDList of .15,.175, .2, ..., 1.1
        
    - PTLMuxSelectsSwitching Folder - contains all files need to run the transient analysis on the mux testbench for when the select lines to the 
        mux are switching, but not the select lines (mux as a LUT)
        - The script generates csv files that contain energy consumption of the low and high rails as well as the delay info of the circuit
        - The csv files are named Output with the low VDD number and the difference between the low and high. For example output_900_200.txt
           is the result when VDDL=0.9V and VDDH=1.1V
        - Note that the ocean script was run with VDDHdeltaList = list(0.0) with large list in the VDDLList to generate the single VDD base case
            - in Figure 4 and 5, our base case was generated using VDDList of .15,.175, .2, ..., 1.1
        
        
To Generate Graphs From Report:
    Note: After all ocean simulations have completed as designated below, run the Matlab script "gatherdata.m" to parse all data into .mat file.
          All other matlab scripts depend on this .mat file. After gatherdata.m is executed, collapsedata.m must be run to generate a .mat file
          that all dual-Vdd simulations depend on (leakage simulations do not require collapsedata.m).

    - To generate first Pareto plot of Energy-Delay Improvement of LUT (Figure 4)
        - Open folder PTLMuxSelectsSwitching and run the Ocean script ptlmux2.ocn
        - After gatherdata.m and collapsedata.m, execute selects.m to generate E-D plot.
                
    - To generate second Pareto plot Energy-Delay Improvement of Mux as a Router(Figure 5)
        - Open folder PTLMuxInputsSwitching and run Ocean script the ptlmux2.ocn
        - After gatherdata.m and collapsedata.m, execute inputs.m to generate E-D plot.

    - To generate energy and delay graphs as a function of activity (alpha) (Figure 6 and 7)
        - After gatherdata.m and collapsedata.m, execute activityratio.m to generate E vs alpha and D vs alpha s
    
    - To generate leakage per SRAM Vector (Figure 8 and Figure 9)
        - Open folder LeakageSneakOnly and run the Ocean script ptlmuxdc.ocn
        - Open folder LeakageFullTB and run the Ocean script ptlmuxdc.ocn
        - After gatherdata.m, execute optRandTest.m - optimizes every SRAM vector and calculates the savings (could take a few hours)
            - optRandTest.m depends bitprobdistr.m, expandleakdata.m, optimizeLeakage.m, genleakpaths.m, and leakagescore.m
        - Execute analyzeRandTest.m - generates leakage plots.
        

        
        